from typing import  List


class Solution:
    def generate(self, numRows: int) -> List[List[int]]:
        if numRows <= 0:
            return []
        ans = [[1]]
        for i in range(1, numRows):
            ret = [1]
            for j in range(1, i):
                ret.append(ans[i-1][j-1] + ans[i-1][j])
            ret.append(1)
            ans.append(ret)
        return ans


nn = 5

s = Solution()
print(nn)
print(s.generate(nn))
